package com.xiaoyu.tool.entity.adminUser;

import com.xiaoyu.tool.entity.common.AbstractEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;

/**
 * Created by xiaoyu on 2017/9/4.
 */
@Entity
@Table(name = "admin_users")
@Data
@EqualsAndHashCode(callSuper = true)
public class AdminUser extends AbstractEntity {

    @NotEmpty(message = "用户名不能为空")
    @Column
    private String username;

    @NotBlank(message = "密码不能为空")
    @Size(min = 5,max = 16,message = "密码长度为5-16位")
    @Column
    private String password;

    @Column
    private Boolean status = Boolean.TRUE; //账户状态(可用/禁用<默认可用>)

}
